<template>
	<div class="zco-tts-container">
		<p :style="getStyle">{{ getMessage }}</p>
		<template>
			<p :style="getStyle">播报内容：</p>
			<p>{{ data }}</p>
		</template>
	</div>
</template>
<script>
import ZcoIM from '../../index';
export default {
	name: 'APP',
	props: {
		businessType: {
			type: String,
			default: () => ''
		},
		data: {},
		fromUserName: {
			type: String,
			default: () => ''
		}
	},
	computed: {
		getMessage() {
			return `${this.businessType === 'start-tts-speaking' ? '发起TTS辅助播报' : '取消辅助播报'}`;
		},
		getStyle() {
			if ((ZcoIM.agent && this.fromUserName === ZcoIM.agent.userName) || (ZcoIM.client && this.fromUserName === ZcoIM.client.userName)) {
				return 'text-align: right;';
			} else {
				return '';
			}
		}
	},
	data() {
		return {};
	},
	methods: {},
	created() {},
	mounted() {}
};
</script>
<style scoped>
.zco-tts-container p {
	margin: 0;
}
</style>
